package com.westos.spring.annotation;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;

@Configuration
@PropertySource("classpath:jdbc.properties")
public class JdbcBean {
	@Value("jdbc.url")
	private String url;
	@Value("jdbc.driverClassName")
	private String driverClassName;
	@Value("jdbc.minIdle")
	private String minIdle;
	@Value("uname")
	private String uname;
	@Value("pwd")
	private String pwd;
	
	@Bean
	public static PropertySourcesPlaceholderConfigurer getPropertySource(){
		return new PropertySourcesPlaceholderConfigurer();
	}
	
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getDriverClassName() {
		return driverClassName;
	}
	public void setDriverClassName(String driverClassName) {
		this.driverClassName = driverClassName;
	}
	public String getMinIdle() {
		return minIdle;
	}
	public void setMinIdle(String minIdle) {
		this.minIdle = minIdle;
	}
	public String getUname() {
		return uname;
	}
	public void setUname(String uname) {
		this.uname = uname;
	}
	public String getPwd() {
		return pwd;
	}
	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
	
	
	
}
